import {createStore,applyMiddleware} from 'redux'
import rootReducer from './reducers/root.reducer'
import createSagaMiddleware from 'redux-saga'
import todoSage from './saga/todo.saga'
const sagaMiddleware = createSagaMiddleware()

const store = createStore(rootReducer,applyMiddleware(sagaMiddleware))
sagaMiddleware.run(todoSage)

export default store
/***
 *  01-完成store的创建
 *  02-中间件的处理
 * 
 */